<?php

namespace common\entities\myhtsq;

use Yii;
use common\error\ErrorCode;

/**
 * This is the model class for table "ztc_role".
 *
 * @property integer $role_id
 * @property string $role_name
 * @property integer $organization_id
 * @property integer $parent_id
 * @property integer $is_system
 * @property integer $is_delete
 * @property integer $orders
 * @property string $created_on
 * @property string $created_by
 * @property string $modified_on
 * @property string $modified_by
 */
class RoleEntity extends \common\entities\ConfigEntity
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 'myscrm_role';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['role_name', 'organization_id'], 'required'],
            [['organization_id', 'parent_id', 'is_system', 'is_delete', 'orders'], 'integer'],
            [['created_on', 'modified_on'], 'safe'],
            [['role_name'], 'string', 'max' => 20],
            [['created_by', 'modified_by'], 'string', 'max' => 50]
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'role_id' => 'Role ID',
            'role_name' => 'Role Name',
            'organization_id' => 'Organization ID',
            'parent_id' => 'Parent ID',
            'is_system' => 'Is System',
            'is_delete' => 'Is Delete',
            'orders' => 'Orders',
            'created_on' => 'Created On',
            'created_by' => 'Created By',
            'modified_on' => 'Modified On',
            'modified_by' => 'Modified By',
        ];
    }
    
    
}
